package com.hl.order.domain;

import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 购物车接口管理对象 cart
 * 
 * @author ruoyi
 * @date 2025-08-12
 */
public class Cart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车id，主键 */
    private Long cartId;

    /** 用户id，关联用户表 */
    @Excel(name = "用户id，关联用户表")
    private Long userId;

    /** 店铺id，关联店铺表，标识商品所属店铺 */
    @Excel(name = "店铺id，关联店铺表，标识商品所属店铺")
    private Long shopId;

    /** 商品id，关联商品表 */
    @Excel(name = "商品id，关联商品表")
    private Long goodsId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 商品单价 */
    @Excel(name = "商品单价")
    private BigDecimal goodsPrice;

    /** 商品种类（0--外卖商品，1--商城商品） */
    @Excel(name = "商品种类", readConverterExp = "0=--外卖商品，1--商城商品")
    private Long goodsType;

    /** 购买数量，默认1 */
    @Excel(name = "购买数量，默认1")
    private Long quantity;

    /** 商品小计（商品数量×商品单价） */
    @Excel(name = "商品小计", readConverterExp = "商=品数量×商品单价")
    private BigDecimal totalPrice;

    /** 单件打包费 */
    @Excel(name = "单件打包费")
    private BigDecimal wrapFees;

    /** 总打包费（wrap_fees×quantity） */
    @Excel(name = "总打包费", readConverterExp = "w=rap_fees×quantity")
    private BigDecimal wraps;

    /** 是否已选中（1-选中，0-未选中） */
    @Excel(name = "是否已选中", readConverterExp = "1=-选中，0-未选中")
    private Long selected;

    public void setCartId(Long cartId) 
    {
        this.cartId = cartId;
    }

    public Long getCartId() 
    {
        return cartId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setShopId(Long shopId) 
    {
        this.shopId = shopId;
    }

    public Long getShopId() 
    {
        return shopId;
    }

    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }

    public void setGoodsName(String goodsName) 
    {
        this.goodsName = goodsName;
    }

    public String getGoodsName() 
    {
        return goodsName;
    }

    public void setGoodsPrice(BigDecimal goodsPrice) 
    {
        this.goodsPrice = goodsPrice;
    }

    public BigDecimal getGoodsPrice() 
    {
        return goodsPrice;
    }

    public void setGoodsType(Long goodsType) 
    {
        this.goodsType = goodsType;
    }

    public Long getGoodsType() 
    {
        return goodsType;
    }

    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }

    public void setTotalPrice(BigDecimal totalPrice) 
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice() 
    {
        return totalPrice;
    }

    public void setWrapFees(BigDecimal wrapFees) 
    {
        this.wrapFees = wrapFees;
    }

    public BigDecimal getWrapFees() 
    {
        return wrapFees;
    }

    public void setWraps(BigDecimal wraps) 
    {
        this.wraps = wraps;
    }

    public BigDecimal getWraps() 
    {
        return wraps;
    }

    public void setSelected(Long selected) 
    {
        this.selected = selected;
    }

    public Long getSelected() 
    {
        return selected;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("cartId", getCartId())
            .append("userId", getUserId())
            .append("shopId", getShopId())
            .append("goodsId", getGoodsId())
            .append("goodsName", getGoodsName())
            .append("goodsPrice", getGoodsPrice())
            .append("goodsType", getGoodsType())
            .append("quantity", getQuantity())
            .append("totalPrice", getTotalPrice())
            .append("wrapFees", getWrapFees())
            .append("wraps", getWraps())
            .append("selected", getSelected())
            .toString();
    }
}
